const { Cmd } = require('./Cmd');
const { Condition } = require('./Condition');
const vscode = require('vscode');

let isEditMode = false;

function modeInit (context) {
    let mode = new Condition('isEditMode', isEditMode);

    new Cmd('extention.escape', () => {
        isEditMode = !isEditMode;
        mode.update(isEditMode);
        vscode.window.showInformationMessage('edit mode: ' + isEditMode);
    }).register(context);
}

module.exports = {
    modeInit,
    isEditMode
};
